home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 August / Chip_1999-08_cd.bin / sharewar / htmltool / _SETUP.1 / Printing Text.scp < prev    next >
Text File  |  1998-08-02  |  1KB  |  47 lines

  1. <HTMLtool>Displays a textbox where text is being entered letter by letter</HTMLtool>
  2. <HTML><HEAD><SCRIPT LANGUAGE="JavaScript">
  3. <!-- begin
  4. // 1996 by Christoph Bergmann... http://acc.de/cb
  5. // Please keep this note...
  6. // global variables
  7. var max=0;
  8. function textlist()
  9. {
  10.     max=textlist.arguments.length;
  11.     for (i=0; i<max; i++)
  12.         this[i]=textlist.arguments[i];
  13. }
  14. tl=new textlist
  15. (
  16.  
  17.     "Your text here (no quotation marks here)"
  18. );
  19. var x=0; pos=0;
  20. var l=tl[0].length;
  21.  
  22. function textticker()
  23. {
  24.     document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";
  25.  
  26.     if(pos++==l)
  27.     {
  28.         pos=0;
  29.         setTimeout("textticker()",1000);
  30.         x++;
  31.         if(x==max)
  32.             x=0;
  33.         l=tl[x].length;
  34.     } else
  35.         setTimeout("textticker()",50);
  36. }
  37. // end -->
  38. </script>
  39. </HEAD><BODY><SCRIPT LANGUAGE="JavaScript">
  40. <!--
  41. document.write("<FORM NAME=\"tickform\">");
  42. document.write("<INPUT TYPE=\"TEXT\" NAME=\"tickfield\" SIZE=\"40\">");
  43. document.write("</FORM>");
  44. textticker();
  45. //-->
  46. </SCRIPT>
  47. </BODY></HTML>